package com.lablzh.gdxy.repository.activity;


import com.lablzh.gdxy.entity.activity.TeamProject;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;
import java.util.List;

public interface TeamProjectRepository extends JpaRepository<TeamProject,Integer> {
    TeamProject findByTeamNameAndProjectName(String teamName, String projectName);
    @Modifying
    @Transactional
    @Query("update TeamProject set audit=?2 where id=?1")
    void updateAuditById(Integer id, String audit);

    List<TeamProject> findAllByProjectName(String projectName);
    List<TeamProject> findAllByTeamName(String teamName);

}
